home *** CD-ROM | disk | FTP | other *** search
/ J-Mac Electronics & Home Comics / J-Mac Electronics & Home Comics.iso / mac / J-MAC / G20F / G20_SHIO.Dxr / 00082_scroll2.ls < prev    next >
Encoding:
Text File  |  1998-01-22  |  1.2 KB  |  51 lines

  1. global gloch, glocv, haba, high, y1, y2
  2.  
  3. on gscno
  4.   global gloch, glocv, haba, high, y1, y2
  5.   set gloch to 20
  6.   set glocv to -80
  7.   set haba to 480
  8.   set high to 640
  9.   set y1 to -210
  10.   set y2 to 24
  11.   puppetSprite(1, 1)
  12. end
  13.  
  14. on scrollup
  15.   repeat while stillDown()
  16.     if rollOver(clickOn()) then
  17.       set the memberNum of sprite 15 to 63
  18.       updateStage()
  19.       if (glocv >= y1) and (glocv <= y2) then
  20.         set glocv to glocv - 8
  21.         if glocv < y1 then
  22.           set glocv to y1
  23.         end if
  24.         set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  25.         next repeat
  26.       end if
  27.     end if
  28.   end repeat
  29.   set the memberNum of sprite 15 to 63
  30.   updateStage()
  31. end
  32.  
  33. on scrolldown
  34.   repeat while stillDown()
  35.     if rollOver(clickOn()) then
  36.       set the memberNum of sprite 16 to 65
  37.       updateStage()
  38.       if (glocv >= y1) and (glocv <= y2) then
  39.         set glocv to glocv + 8
  40.         if glocv > y2 then
  41.           set glocv to y2
  42.         end if
  43.         set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  44.         next repeat
  45.       end if
  46.     end if
  47.   end repeat
  48.   set the memberNum of sprite 16 to 64
  49.   updateStage()
  50. end
  51.